//
//  SkillPlannerFieldCell.m
//  EVE Mac Suite
//
//  Created by Vadim Lozko on 2/13/09.
//  Copyright 2009 __Vadim__. All rights reserved.
//

#import "SkillPlannerFieldCell.h"


@implementation SkillPlannerFieldCell
/*
-(void)drawLevelBarsInFrame:(NSRect)cellFrame color:(NSColor*)aColor
{
	float xOrigin = cellFrame.origin.x;
	float yOrigin = cellFrame.origin.y;
	[aColor set];
	[[NSGraphicsContext currentContext] saveGraphicsState];
	[[NSGraphicsContext currentContext] setShouldAntialias:NO];
	NSImageInterpolation interpolation = [[NSGraphicsContext currentContext] imageInterpolation];
	[[NSGraphicsContext currentContext] setImageInterpolation: NSImageInterpolationHigh];
	[[NSColor blackColor] set];
	
	int i;
	for(i = 0; i < 5; i++)
	{
		[NSBezierPath strokeRect:NSMakeRect(xOrigin + 1 + (3 * i), yOrigin + 2, 3, 12)];
	}
	[[NSGraphicsContext currentContext] setImageInterpolation: interpolation];
	[[NSGraphicsContext currentContext] restoreGraphicsState];	
}

-(void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
{
	float xOrigin = cellFrame.origin.x;
	float yOrigin = cellFrame.origin.y;

	NSDictionary* data  = [self objectValue];
	
	NSColor* stringColor = [self isHighlighted] ? [NSColor alternateSelectedControlTextColor] : [NSColor textColor];
		NSDictionary* regularStringAttributes = [NSDictionary dictionaryWithObjectsAndKeys:stringColor, NSForegroundColorAttributeName,
												 [NSFont systemFontOfSize:12], NSFontAttributeName, nil];
	//Draw in text
	NSString* text = [data objectForKey:SKILL_NAME_KEY];
	[text drawAtPoint:NSMakePoint(xOrigin + 20, yOrigin - 2) withAttributes:regularStringAttributes];
	
	NSString* type = [data objectForKey:SKILL_PLANNER_DICT_TYPE_KEY];
	
	if([type isEqualToString:SKILL_PLANNER_DICT_GROUP_TYPE])
	{
		
	}
	
	if([type isEqualToString:SKILL_PLANNER_DICT_LEARNED_TYPE])
	{
		[self drawLevelBarsInFrame:cellFrame color:[NSColor blackColor]];
		//int level = [[data objectForKey:SKILL_PLANNER_DICT_LEARNED_LEVEL_KEY] intValue];
		[self setTextColor:[NSColor blackColor]];
		[NSBezierPath setDefaultLineWidth:1.0];
		
		
	}
}*/

@end
